package com.hulu.yec.common;

import org.apache.log4j.Logger;

import com.hulu.yec.common.util.AppUtil;
import com.hulu.yec.common.util.LogUtil;

/**
 * 系统常量
 * 
 * @author hf001 2016年3月5日
 */
public class Constant {

	private Constant() {

	}

	/**
	 * 数据库相关的常量
	 */
	public static final String DRIVER = AppUtil.getDefaultBundle("driver");
	public static final String URL = AppUtil.getDefaultBundle("url");
	public static final String USER = AppUtil.getDefaultBundle("user");
	public static final String PASSWORD = AppUtil.getDefaultBundle("password");

	/**
	 * 分页设置
	 */
	public static final int DEFAULT_PAGE_NO = 1;
	public static final int DEFAULT_PAGE_SIZE = 20;

	/**
	 * 编码
	 */
	public static final String ENCODING_UTF8 = "UTF-8";
	public static final String ENCODING_ISO88591 = "ISO-8859-1";
	public static final String ENCODING_GBK = "GBK";

	/**
	 * Validate较验后缀
	 */
	public static final String VALIDATE_NOT_BLANK = "不能为null或\"\"";
	public static final String VALIDATE_NOT_NULL = "不能为null";
	
	/**
	 * 记录日志常量
	 */
	public static final Logger LOGGER = Logger.getLogger(LogUtil.class);
	
	/**
	 * 新增用户是默认密码和默认状态
	 */
	public static final String DEFAULT_PASSWORD= "123456";
	public static final int DEFAULT_STATE = 1;
	/**
	 * 试卷类型
	 */
	public static final int CHOICETYPE = 1;
	public static final int MULTITYPE = 2;
	public static final int JUDGETYPE = 3;
}